<template>
  <z-container>
    <z-header height="28px">pagination (分页)</z-header>
    <z-main>
      <z-row :gutter="12">
        <z-col :span="3">基础用法</z-col>
        <z-col :span="12">
          <z-pagination :page-size="NaN" layout="prev, pager, next" :total="100"></z-pagination>
        </z-col>
      </z-row>
      <z-row :gutter="12">
        <z-col :span="3">加背景</z-col>
        <z-col :span="12">
          <z-pagination :page-sizes="[20,50,100, 200, 300, 400]" :pager-count="5" :page-size="20" background layout="total, sizes, prev, pager, next, jumper" :total="400"> </z-pagination>
        </z-col>
      </z-row>
       <z-row :gutter="12">
        <z-col :span="3">统一回调</z-col>
        <z-col :span="12">
          <z-pagination :page-sizes="[100, 200, 300, 400]" :page-size.sync="pageSize" layout="->,total, sizes, prev, pager,slot , next, jumper" :total="400" @fetch-data="fetchData"> slot test</z-pagination>
        </z-col>
      </z-row>
  </z-main>
  </z-container>
  
  
</template>
<script>
export default{
  name:'cPagination',
  data(){
    return {
      pageSize:NaN
    }
  },
  watch: {
    pageSize(newval){
      console.log(newval)
    }
  },
  mounted() {
    
  },
  methods: {
    fetchData(params){
      console.log(params)
    }
  },
}
</script>